package com.cmy.dao;

import com.cmy.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;


public interface UserMapper {

    @Select("select * from user")
    List<User> getUsers();
    @Select("select * from user where id = #{id}")
    User getUserById(@Param("id") int id);
    @Insert("insert into user(id,name,pwd) values(#{id},#{name},#{pwd})")
    int insertUser(User user);
    @Update("update user set name=#{name} where id = #{id}")
    int modUsername(@Param("id") int id,@Param("name") String name);
    @Delete("delete from user where id = #{id}")
    int delUser(@Param("id") int id);
}
